<template>
  <div class="follow page-margin">
    
    <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
      <van-cell
        v-for="(item,index) of follow"
        :key="item._id"
        :title="index + 1 + '.' + item.title" 
        :label="item.des" 
        :to="`/detail/${item._id}?collectionName=follow`" 
      />
    </van-pull-refresh>
    
  </div>
</template>

<script>
  export default {
    name:'follow',
    props:{},
    data(){
      return {
        isLoading:false,
        follow: this.$route.query.data
      }
    },
    components:{},
    mounted(){
      
    },
    updated(){},
    methods:{
      onRefresh(){
        
        console.log('axios');
        
        this.$axios({
          url:'/api/news/follow',
          params:{
            _page:1,_limit:10
          }
        }).then(
          res=>{
            this.follow = res.data.data
            this.isLoading=false
          }
        )
      }
    },
    computed: {
    }
  }
</script>

<style>
  .follow{}
  
</style>

